import YchConstant from "@/api/YchConstant"; //接口模块配置项
import { axios } from "@/utils/request"; //请求
// --------------------------日常考评系统-----------------------------
// 流程列表-分页查询
export const everydayPage = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/flowJobPage",
    method: "GET",
    params,
    url_1:'outside'
  });
};

// 流程列表-当前流程任务详情
export const queryJobByJobId = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/queryJobByJobId",
    params: params,
    method: "GET",
    url_1:'outside'
  });
};

// 对考评人员评价
export const xpHcyPj = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/xpHcyPj",
    data: data,
    method: "PUT",
    url_1:'outside'
  });
};

//对考评人员一键优秀评价
export const xpHcyPjToOneExcellent = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/xpHcyPjToOneExcellent",
    params: params,
    method: "GET",
    url_1:'outside'
  });
};

//对考评人员一键清空评价
export const xpHcyPjToEmpty = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/xpHcyPjToEmpty",
    params: params,
    method: "GET",
    url_1:'outside'
  });
};

// 日常考评流程保存接口
export const saveFlow = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/saveFlow",
    data: data,
    method: "POST",
    url_1:'outside'
  });
};
// 日常考评流程提交接口
export const submitFlow = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/submitFlow",
    data: data,
    method: "POST",
    url_1:'outside'
  });
};
// 日常考评流程退回上一步接口
export const returnUpperFlowJob = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/returnUpperFlowJob",
    data: params,
    method: "post",
    url_1:'outside'
  });
};

// 刷新评价
export const queryXpHcy = function (sqsxid) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-rckp/queryXpHcy",
    params: {sqsxid:sqsxid},
    method: "GET",
    url_1:'outside'
  });
};
// 统计
export const queryRckpStatPageList = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-rckp/queryRckpStatPageList',
    params: params,
    method: "GET",
    url_1:'outside'
  });
}

// 统计-下载
export const exportRckpJbxxDatas = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-rckp/exportRckpJbxxData',
    params: params,
    method: "GET",
    responseType: 'arraybuffer',
    url_1:'outside'
  });
}

// 药品生产-流程监听
export const flowJkPage = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-rckp/flowJkPage',
    params: params,
    method: "get",
    url_1:'outside'
  });
}

// 药品生产-流程监听
export const queryRckpStatJbxx = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-rckp/queryRckpStatJbxx',
    params: params,
    method: "get",
    url_1:'outside'
  });
}


//批量打印日常考评查询列表
export const queryBatchJobByJobIds = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-rckp/queryBatchJobByJobIds',
    params: params,
    method: "get",
    url_1:'outside'
  });
}

export const downMyQm = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/myJbxx/downMyQm',
    params: params,
    method: "GET",
    responseType:"arraybuffer",
    url_1:'outside'
  });
}